<div class="layuimini-container">
    <div class="layuimini-main">
        <fieldset id="searchFieldset_currentTable" class="table-search-fieldset layui-hide">
            <legend>{:lang("common.condition_search")}</legend>
            <form class="layui-form layui-form-pane form-search">
                <div class="layui-form-item layui-inline" style="margin-left:50px">
                    <button type="submit" class="layui-btn layui-btn-normal" data-type="tableSearch"
                            lay-submit lay-filter="search_currentTable">{:lang("common.btn_search")}
                    </button>
                </div>
            </form>
        </fieldset>

        <table id="currentTable"
               data-auth-add="{:auth(request()->controller().'/add')}"
               data-auth-edit="{:auth(request()->controller().'/edit')}"
               data-auth-delete="{:auth(request()->controller().'/delete')}"
               data-auth-print="{:auth(request()->controller().'/print')}"
               data-auth-authorize="{:auth(request()->controller().'/authorize')}">
        </table>
    </div>
</div>
<script>
    layui.use(['myCommon'], function () {
        let myCommon = layui.myCommon;
        myCommon.table.render({
            where: myCommon.generateCondition()
            , limit: "{$param.limit|default='15'}"
            , cols: [[
                {type: "checkbox"}
                , {field: 'id', width: 60, title: '{:lang("common.id")}', sort: true}
                , {field: 'pic', width: 80, title: '{:lang("banner.pic")}', templet: myCommon.table.image}
                , {field: 'href', minWidth: 80, title: '{:lang("banner.href")}'}
                , {field: 'sort', width: 60, title: '{:lang("common.sort")}', sort: true}
                , {field: 'update_time', width: 148, title: '{:lang("common.update_time")}', sort: true}
                , {
                    width: 94, title: '{:lang("common.operate")}', templet: myCommon.table.tool,
                    operat: ['edit', 'delete']
                }
            ]]
        });
        myCommon.listen();
    });
</script>
